1 using System;
2 using
System.Collections.Generic;
3 using
System.ComponentModel;
4 using
System.Data;
5 using
System.Drawing;
6 using
System.Linq;
7 using
System.Text;
8 using
System.Threading.Tasks;
9 using
System.Windows.Forms;
10
11 namespace
SoftQuanLyNhaHang.Views
12 {
13     
public partial class frmDonViTinh : Form
14     {
15         
public frmDonViTinh()
16         {
17             InitializeComponent();
18         }
19
20         
private void btnHuy_Click(object sender, EventArgs e)
21         {
22             
this.Close();
23         }
24
25         
private void btnThucHien_Click(object sender, EventArgs e)
26         {
27             
string _tenDonViTinh = string.Empty;
28             
string _maDonViTinh = string.Empty;
29
30             
try
31             {
32                 _tenDonViTinh = txtTenDonViTinh.Text.Trim();
33             }
34             
catch { }
35
36             
if (string.IsNullOrEmpty(_tenDonViTinh))
37             {
38                 MessageBox.Show(
"Tên đơn vị tính không được để trống!");
39                 txtTenDonViTinh.Focus();
40                 
return;
41             }
42
43             Controllers.DonViTinhCtrl.InsertDonViTinh(_maDonViTinh, _tenDonViTinh,
1, 1);
44
45             
this.Close();
46         }
47     }
48 }


Gõ tìm kiếm nhanh...